<!DOCTYPE html>
<HTML>
<HEAD>
    <TITLE> ZTREE DEMO </TITLE>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
</HEAD>
<BODY>
<div>
    <ul id="treeDemo" class="ztree"></ul>
</div>
<link rel="stylesheet" href="/ztree/css/demo.css" type="text/css">
<link rel="stylesheet" href="/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/ztree/js/jquery.ztree.all.js"></script>
<SCRIPT LANGUAGE="JavaScript">
    var zTreeObj;
    var setting = {
        data: {
            simpleData: {
                enable: true,//表示使用简单数据模式
                idKey: "id",  //节点数据中保存唯一标识的属性名称
                pIdKey: "parentId",  //节点数据中保存其父节点唯一标识的属性名称
                rootPId: null  //根节点id
            }//json 格式javascript对象
        }
    };
    $(document).ready(function () {
        let url = "http://localhost/category/doFindCategory";
        $.get(url, function (result) {
            zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, result);
        })
    });
</SCRIPT>
</BODY>
</HTML>